<template>
  <div class="fullbox">
    <Silder :Img="ShoppingInfoData.bannerimgs"/>
    <ShoppingClassView :ClassData="ShoppingInfoData.classinfo"/>
    
    <ShoppingListView :ListData="ShoppingInfoData.list" :title="ShoppingInfoData.title"/>
  </div>
</template>

<script>
import ShoppingListView from "./Components/ShoppingListView";
import Silder from "@/components/Silder";
import ShoppingClassView from "./Components/ShoppingClassView";

export default {
  name: "Shopping",
  components: {
    ShoppingListView,
    Silder,
    ShoppingClassView
  },
  data() {
    return {
      ShoppingInfoData: {
        // 注意:有length必须写这个
        bannerimgs: [],
        classinfo: [],
        list:[]
      }
    };
  },
  mounted() {
    this.$api.ShoppingInfo.ShoppingList(null)
      .then(res => {
        this.ShoppingInfoData = res.data;
        // console.log(this.ShoppingInfoData.list);
      })
      .catch(error => {
        console.log(error);
      });
  }
};
</script>
<style scoped lang="less">
.fullbox{
  background-color: white;
  overflow: scroll;
  padding-bottom: 3rem;
  margin-top: 5.2rem
}
</style>